<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateCmcSystemLevelTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('cmc_system_level', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('mer_id')->default('0')->comment('商户id');
            $table->string('name')->default('')->comment('会员名称');
            $table->decimal('money')->default('0.00')->comment('购买金额');
            $table->integer('valid_date')->default('0')->comment('有效时间');
            $table->tinyInteger('is_forever')->default('0')->comment('是否为永久会员');
            $table->tinyInteger('is_pay')->default('0')->comment('是否购买,1=购买,0=不购买');
            $table->tinyInteger('is_show')->default('0')->comment('是否显示 1=显示,0=隐藏');
            $table->integer('grade')->default('0')->comment('会员等级');
            $table->decimal('discount')->default('0.00')->comment('享受折扣');
            $table->string('image')->default('')->comment('会员卡背景');
            $table->string('icon')->default('')->comment('会员图标');
            $table->text('explain')->comment('说明');
            $table->integer('add_time')->default('0')->comment('添加时间');
            $table->tinyInteger('is_del')->default('0')->comment('是否删除.1=删除,0=未删除');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('cmc_system_level');
    }
}
